feat(scaffold-core): create @stackbilt/scaffold-core package skeleton (#212)#219
Merged
Conversation
…#212) Zero-dependency, zero-inference, zero-network scaffold engine package with full module skeleton (classify, knowledge, governance, codegen, materializer) and stub implementations. All stubs throw "Not implemented" pending child issue PRs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces stubs in materializer/adf.ts, materializer/project.ts, and materializer/index.ts with real implementations extracted from stackbilt-web/src/lib/scaffold-materializer.ts. - adf.ts: renderManifestAdf, renderCoreAdf, renderStateAdf + generateAdfFiles() - project.ts: DomainHints, PrdSections, STACK_ITEM_MAPPINGS, FIRST_PARTY_DEPS, all template renderers (package.json, wrangler.toml, tsconfig.json, src/index.ts, test file, README, schema.sql, contract stub) + generateProjectFiles() - index.ts: materializeScaffold(facts, rawFacts?) → MaterializerResult Adapts source's Facts+intention API to the package's structured ScaffoldFacts type. Maps source FileRole values (governance→adf, scaffold→entry, doc→readme, etc.) to types.ts FileRole. Zero TypeScript errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…kbilt-web Replace all stubs in classify/ and knowledge/ with real implementations extracted from stackbilt-web/src/lib/scaffold-core.ts. Patterns, scoring functions, enricher, bindings, quality-profile inference, pattern-specific threat catalog (9 patterns), domain threats (PHI/PCI/PII/telephony), and ADR context/decision blocks are all live. Types adapted to match types.ts canonical definitions (PatternName, QualityProfile, ThreatEntry, etc.). Build passes zero TypeScript errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add governance/index.ts: buildGovernance(facts, knowledge) → GovernanceDocs - Add governance/threat-model.ts: Markdown threat model from facts + pattern threats - Add governance/adr.ts: ADR-001 (pattern choice) + ADR-002 (compliance domains) - Add governance/test-plan.ts: Trait-aware test plan generator - Complete codegen/files.ts: full baseFiles + addGovernanceFiles implementation - Complete codegen/routes.ts: route handler file generation per pattern - Complete codegen/wrangler.ts: binding definition generator - Update codegen/index.ts: export addGovernanceFiles - Update main index.ts: orchestrate governance + codegen grafting in buildScaffold - Migrate classify.test.ts from stackbilt-web scaffold-domain-fixtures suite - Update types.test.ts: remove stub-throws assertions, assert real implementations work - Fix .gitignore: anchor governance/ to root-only (/governance/) so packages/scaffold-core/src/governance/ is tracked Fixes build-and-test CI failure (TS2307: Cannot find module './governance/index') Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Jun 12, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/scaffold-core/as a new workspace package@stackbilt/scaffold-core@0.1.0(experimental)tsconfig.build.json(references) andtsconfig.base.json(paths)Modules stubbed
classify/classify(intention) → ClassifyResultknowledge/getKnowledge(pattern) → PatternKnowledgegovernance/buildGovernance(facts, knowledge) → GovernanceDocscodegen/generateFiles(facts) → ScaffoldFile[]materializer/materializeScaffold(facts) → MaterializerResultindex.tsbuildScaffold(intention, options?) → LocalScaffoldResultAll stub functions throw
Not implemented: use @stackbilt/scaffold-core@x.y when <module>/ module lands(or return valid empty results where documented). Theknowledge/stubs intentionally return empty arrays rather than throwing to make the orchestrator partially testable.Notes
0.1.0per the design doc (experimental, not 1.0.0)src/types.ts— no cross-package importsTest plan
pnpm install— workspace package registered cleanlypnpm run build— TypeScript compiles with zero errors (tsc --build)pnpm test— all 20 new scaffold-core tests pass (types compile, exports verified, stubs throw as documented, package metadata correct)🤖 Generated with Claude Code